import os
# file = open('./1.txt','r',encoding='utf-8')
# print(file.read())#只读文件
# file.close()
# file2 = open('./1.txt','w',encoding='utf-8')
# file2.write("a,b")#覆盖文件内容
# file2.close()
# file3 =open('./1.txt','a',encoding='utf-8')
# file3.write('\nhello world')
# file3.close()

#with open('./5.txt','r',encoding='utf-8') as file4:
    #print(file4.read(3))#只读取前三个字符
    # while True:
    #     line = file4.readline()
    #     if not line:
    #         break
    # print(line)
# with open('./5.txt','r',encoding='utf-8') as file4:
#     print(file4.readlines())
#
# with open('./5.txt','a',encoding='utf-8') as file4:
#     str4 ='\nhello world4'
#     file4.write(str4)
#     list4 =['\nhello world5','\nhello world6','\nhello world7']
#     file4.writelines(list4)

# print("-------------------------")
# with open('1.png','rb') as file:
#     with open('d:/PC/2.png','wb') as file2:
#      while True:
#         data = file.read(1024)
#         if not data:
#             break
#         file2.write(data)
# with open('./1.txt', 'r',encoding='utf-8') as file:
#     print(file.tell())
#     line = file.read(3)
#     print(file.tell())
# os.rmdir('./2.png')
# os.remove('./4442.png')
# os.rmdir('./2.png')

print(os.getcwd())
print(os.listdir('./'))
#循环路径








